package com.yy.wga.user.feign.api;

import com.yy.wga.common.core.dto.Result;
import com.yy.wga.user.feign.request.WxAuthCode2SessionReq;
import com.yy.wga.user.feign.response.WxAuthCode2SessionResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 微信公众号管理
 *
 * @author <a href="mailto:ludezh@dingtalk.com"> ludezh </a>
 * @version 1.0.0   2020/6/5,11:30
 * @since 1.0.0     2020/6/5,11:30
 */
@FeignClient(name = "user-official-account-feign",
        url = "http://127.0.0.1:9100",
        path = "/api/user/officialAccount/")
public interface UserOfficialAccountFeign {

    /**
     * 小程序微信code登录，没有用户信息
     * @param request WxAuthCode2SessionReq
     * @return WxAuthCode2SessionResp
     */
    @PostMapping("authCode2Session")
    Result<WxAuthCode2SessionResp> authCode2Session(@Validated @RequestBody WxAuthCode2SessionReq request);
}
